import { Component, OnInit } from '@angular/core';

@Component({
  selector: 'app-component',
  templateUrl: './component.component.html',
  styleUrls: ['./component.component.css']
})
export class ComponentComponent implements OnInit {
  public message:string = '我是父组件的message'
  constructor() { }

  ngOnInit(): void {
  }
  run(){
    console.log('我是父组件的run方法')
  }
  getChild(e:any){
    // 获取子组件数据
    console.log(e,'我是父组件的getChild')
  }
}
